import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.edgarli.gamble.domain.TLotto;

import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import java.util.Random;

/**
 * @Description
 * @Author EdgarLi
 * @Date 2025/8/13 17:48
 */
public class test {

    public static void main(String[] args) {
       randomLotto();
    }

    private static void randomLotto() {
        List<String> q = new ArrayList<>();
        for (int i = 0; i < 5; i++) {
            boolean w = true;
            while (w) {
                String n = randomNum(1, 35);
                if (q.contains(n)) {
                    w = true;
                } else {
                    q.add(n);
                    w = false;
                }
            }
        }
        List<String> h = new ArrayList<>();
        for (int i = 0; i < 2; i++) {
            boolean w = true;
            while (w) {
                String n = randomNum(1, 12);
                if (q.contains(n)) {
                    w = true;
                } else {
                    h.add(n);
                    w = false;
                }
            }
        }

        String join = String.join(" ", q) + " " + String.join(" ", h);
        System.out.println(join);

    }

    private static String randomNum(int min, int max) {
        Random random = new Random();
        int x = random.nextInt(max - min + 1) + min;
        return String.format("%0" + 2 + "d", x);
    }

}
